package com.nuyoah.service.impl;

import com.nuyoah.entity.CompetitionRegistration;
import com.nuyoah.mapper.CompetitionRegistrationMapper;
import com.nuyoah.service.CompetitionRegistrationService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 记录学生的竞赛报名详情 服务实现类
 * </p>
 *
 * @author xyx
 * @since 2024-06-03
 */
@Service
public class CompetitionRegistrationServiceImpl extends ServiceImpl<CompetitionRegistrationMapper, CompetitionRegistration> implements CompetitionRegistrationService {

    @Override
    public void register(CompetitionRegistration competitionRegistration) {
        this.save(competitionRegistration);
    }

    @Override
    public CompetitionRegistration getRegistrationInfo(Integer competitionId) {
        return this.baseMapper.getRegistrationInfo(competitionId);
    }

    @Override
    public List<CompetitionRegistration> getRegistrationInfoByStudentId(Integer ids) {
        return this.baseMapper.getRegistrationInfoByStudentId(ids);
    }
}
